#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
#include"vector.h"

void Print(const Sim::list<int>& lt)
{
	Sim::list<int>::const_reverse_iterator rit = lt.rbegin();
	while (rit != lt.rend())
	{
		cout << *rit << " ";
		rit++;
	}
	cout << endl;
}
void test()
{
	Sim::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	Sim::list<int>::reverse_iterator rit = lt.rbegin();
	while (rit != lt.rend())
	{
		cout << *rit << " ";
		++rit;
	}
	cout << endl;

	Print(lt);
}

void Print(const Sim::vector<int>& v)
{
	Sim::vector<int>::const_reverse_iterator rit = v.rbegin();
	while (rit != v.rend())
	{
		cout << *rit << " ";
		rit++;
	}
	cout << endl;
}
void testvector()
{
	Sim::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);

	Sim::vector<int>::reverse_iterator rit = v.rbegin();
	while (rit != v.rend())
	{
		cout << *rit << " ";
		++rit;
	}
	cout << endl;
	Print(v);
}


int main()
{
	//test();
	testvector();
	return 0;
}